//
//  XXSP_ShouYeView.m
//  ShangChengMoBan
//
//  Created by 张铁军 on 16/8/29.
//  Copyright © 2016年 ping. All rights reserved.
//

#import "XXSP_ShouYeView.h"

@implementation XXSP_ShouYeView

-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self initView];
    }
    return self;
}

-(void)initView{
    
    self.backgroundColor = [UIColor whiteColor];
    
    _nameLabel = [[BaseLabel alloc]initWithFrame:CGRectMake(10, 8, KScreenWidth - 100, 24)andFont:PuTongFont];
    _nameLabel.text = @"康明";
    _nameLabel.textColor = MaintextColor;
    
    
    [self addSubview:_nameLabel];
    [self addSubview:[UILabel drawXiaHuaXianLabel:_nameLabel.bottom + 8]];
    
    _buyBtn = [[UIButton alloc]initWithFrame:CGRectMake(KScreenWidth - 90, _nameLabel.top, 80, 24)];
    [_buyBtn setTitle:@"点击买单" forState:UIControlStateNormal];
    [_buyBtn setTitleColor:ZONGCOLOR forState:UIControlStateNormal];
    _buyBtn.layer.cornerRadius = 5;
    _buyBtn.layer.borderColor = [ZONGCOLOR CGColor];
    _buyBtn.layer.borderWidth = 1;
    _buyBtn.titleLabel.font = [UIFont systemFontOfSize:PuTongFont];
    [_buyBtn addTarget:self.delegate action:@selector(buyClicked) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:_buyBtn];
    
    UIImageView *diDianImage = [[UIImageView alloc]initWithFrame:CGRectMake(10, _nameLabel.bottom + 17.5, 25 , 25)];
    diDianImage.image = [UIImage imageNamed:@""];
    [self addSubview:diDianImage];
    
    _diDianLabel = [[BaseLabel alloc]initWithFrame:CGRectMake(diDianImage.right, diDianImage.top, KScreenWidth - 140 , 25)andFont:PuTongFont - 2];
    _diDianLabel.text = @"嘉兴市秀洲区支付成";
    _diDianLabel.textColor = [UIColor lightGrayColor];
    [self addSubview:_diDianLabel];
    
  
    
    UILabel *shuXianLabel = [[UILabel alloc]initWithFrame:CGRectMake(_diDianLabel.right + 5, _diDianLabel.top - 2, 0.5, 34)];
    shuXianLabel.textColor = XiaHuaXianCOLOR ;
    [self addSubview:shuXianLabel];
    
    _callBtn = [[UIButton alloc]initWithFrame:CGRectMake(shuXianLabel.right, _nameLabel.bottom + 5, 100, 30)];
    
    [_callBtn setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
    [self addSubview:_callBtn];
    
    
  
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
